var util = module.exports;

//获取今天日期
util.getDateString = function() {
	var myDate = new Date()
	var month = myDate.getMonth() + 1
	var date = myDate.getDate()
	if(month < 10){
		month = "0"+month
	}
	if(date < 10){
		date = "0"+date
	}
	var dateString = parseInt(""+myDate.getFullYear() + month + date)
	return dateString
}

//获取昨天日期
util.getlackdayString = function(number) {
	var myDate = new Date()
	myDate.setTime(myDate.getTime()-(24*60*60*1000) * number);
	var month = myDate.getMonth() + 1
	var date = myDate.getDate()
	if(month < 10){
		month = "0"+month
	}
	if(date < 10){
		date = "0"+date
	}
	var dateString = parseInt(""+myDate.getFullYear() + month + date)
	return dateString
}
